import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '试题类型',
    align: "center",
    dataIndex: 'type'
  },
  // {
  //   title: '试题图片',
  //   align: "center",
  //   dataIndex: 'image',
  //   customRender: render.renderImage,
  // },
  {
    title: '试题内容',
    align: "center",
    dataIndex: 'content'
  },
  // {
  //   title: '试题答案',
  //   align: "center",
  //   dataIndex: 'answer'
  // },
  // {
  //   title: '试题分值',
  //   align: "center",
  //   dataIndex: 'score'
  // },
  // {
  //   title: '整题解析',
  //   align: "center",
  //   dataIndex: 'analysis'
  // },
  // {
  //   title: '试题备注',
  //   align: "center",
  //   dataIndex: 'remark'
  // },
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime',
  },
  {
    title: '更新日期',
    align: "center",
    dataIndex: 'updateTime',
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "试题库",
    field: 'bankId',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: "试题类型",
    field: 'type',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: "试题内容",
    field: 'content',
    component: 'Input',
    colProps: { span: 6 },
  },
];




//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '试题类型',
    field: 'type',
    component: 'Input',
  },
  {
    label: '试题图片',
    field: 'image',
    component: 'JImageUpload',
    componentProps: {
    },
  },
  {
    label: '试题内容',
    field: 'content',
    component: 'Input',
  },
  {
    label: '答案',
    field: 'answer',
    component: 'Input',
  },
  {
    label: '分值',
    field: 'score',
    component: 'InputNumber',
  },
  {
    label: '整题解析',
    field: 'analysis',
    component: 'Input',
  },
  {
    label: '试题备注',
    field: 'remark',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
